#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024 ArchR (https://github.com/archr-linux/Arch-R)

if grep -q "024C:D723" "/sys/devices/platform/fe000000.mmc/mmc_host/mmc3/mmc3:0001/mmc3:0001:1/uevent"; then
    mount -o rw,remount /flash
    sed -i "/FDT/c\  FDT /device_trees/rk3566-powkiddy-rgb20sx.dtb" /flash/extlinux/extlinux.conf
    reboot
fi
